/******************************************************************************

  File Name     : alg_face_detect.h
  Version       : Initial Draft
  Author        : tongzhilin
  Created       : 2020/8/6
  Last Modified :
  Description   : alg_face_detect_v1
  Function List :
  History       :
  1.Date        : 2020/8/6
    Author      : tongzhilin
    Modification: Created file

******************************************************************************/
#pragma once
#include "nnie_algbasic.h"
#include "mp_mat.h"

class FaceDetV1 : public NnieAlgBasic
{
public:
    FaceDetV1(const char* _pModelName);
    virtual ~FaceDetV1();
    /*
    ** result type ALG_RECT_RESULT_S
    */
    INT32 alg_run_image(ALG_IMAGE_S* _pstImage, INT32 _s32MaxRet, void *_pstResult);
protected:
    bool  ab_image_post();
    bool  ab_image_post_v2();
private:
    bool get_anchor_box(INT32 _s32Step, INT32 _s32BoxNum, float *_pf32BoxSizes, MpMat32f &_s32Anchor);
public:
    //全局static 
    static std::vector<MpMat32f> m_stvAnchor;
private:
    float m_f32ConfThreShold = 0.6;
    float m_f32NmsThreShold = 0.3;
    std::vector<ALG_RECT_RESULT_S> m_stvRectResult;
};